﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="AddLastSemesterCourses.aspx.vb" Inherits="DARSClients.AddLastSemesterCourses" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 212px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table style="padding: 10px; width: 800px;">
            <tr>
                <td align="center" colspan="3" style="padding: 10px">
                    Add Complete Courses</td>
            </tr>
            <tr>
                <td class="style1" style="padding: 10px" valign="top">
                    Choose Semester:<br />
                    <asp:DropDownList ID="ddlSemester" runat="server" DataSourceID="SqlDataSource1" 
                        DataTextField="SemesterTaken" DataValueField="SemesterTaken">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:FA11_4296_BeyondDARSConnectionString %>" 
                        SelectCommand="SELECT DISTINCT [SemesterTaken] FROM [StudentCourse] ORDER BY [SemesterTaken]">
                    </asp:SqlDataSource>
                </td>
                <td colspan="2" style="padding: 10px" valign="top">
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        DataKeyNames="StudentID,CourseID,AttemptNumber" DataSourceID="SqlDataSource2">
                        <Columns>
                            <asp:BoundField DataField="StudentID" HeaderText="StudentID" ReadOnly="True" 
                                SortExpression="StudentID" />
                            <asp:BoundField DataField="CourseID" HeaderText="CourseID" ReadOnly="True" 
                                SortExpression="CourseID" />
                            <asp:BoundField DataField="AttemptNumber" HeaderText="AttemptNumber" 
                                ReadOnly="True" SortExpression="AttemptNumber" />
                            <asp:BoundField DataField="GradeEarned" HeaderText="GradeEarned" 
                                SortExpression="GradeEarned" />
                            <asp:BoundField DataField="SemesterTaken" HeaderText="SemesterTaken" 
                                SortExpression="SemesterTaken" />
                        </Columns>
                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:FA11_4296_BeyondDARSConnectionString %>" 
                        SelectCommand="SELECT [StudentID], [CourseID], [AttemptNumber], [GradeEarned], [SemesterTaken] FROM [StudentCourse] WHERE ([SemesterTaken] = @SemesterTaken)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="ddlSemester" Name="SemesterTaken" 
                                PropertyName="SelectedValue" Type="String" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td class="style1" style="padding: 10px">
                    &nbsp;</td>
                <td style="padding: 10px">
                    &nbsp;</td>
                <td style="padding: 10px">
                    &nbsp;</td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
